<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/axios-0.18.0.js"></script>
    <script src="../js/vue.js"></script>
</head>
<body>
<div id="a">
    页码:<input type="text" v-model="currentPage"><br>
    每页几个:<input type="text" v-model="pageSize"><br>
    userName:<input type="text" v-model="user.username"><br>
    gender:<input type="text" v-model="user.gender"><br>
    email:<input type="text" v-model="user.email"><br>
    <button @click="find">查询</button>
    <ul>
        <li v-for="userss in users" :key="index">
            {{userss.id}}--{{userss.username}}--{{userss.gender}}--{{userss.password}}--{{userss.email}}
        </li>
    </ul>
</div>
<script type="text/javascript">
    var aaa = new Vue({
        el: "#a",
        data: {
            users: [],
            currentPage: 1,
            pageSize: 5,
            user: {
                "username": "",
                "gender": "",
                "email": ""
            }
        },
        created() {
            this.find();
        },
        methods: {
            find() {
                axios.post("/user" + "/" + this.currentPage + "/" + this.pageSize, this.user).then(res => {
                    this.users = res.data;
                })
            }
        }
    });
</script>
</body>
</html>